package datastructures;

import java.util.Random;
import node.BinaryNode;
import structure.BinaryTree;

/**
 *
 * @author Vojta
 */
public class BinaryTreeMain {

    public static void main(String[] args) {
        BinaryTree bt = new BinaryTree();
        Random r = new Random();
        for (int i = 0; i < 1000; i++) {
            BinaryNode n = new BinaryNode(r.nextInt(1000));
            bt.add(n);
        }
        System.out.println(bt);
        System.out.println("Number of nodes: " + bt.size());
        System.out.println(bt.delete(300));
    }
}
